#!/usr/bin/python
import sqlite3
import os
import cgi
import cgitb
from pygallib import usersession
from pygallib import layoutlib
from pygallib import albumlib

cgitb.enable()
logged_in = usersession.logged_in()

headers = {}
headers["Content-type"] = "text/html"
layoutlib.print_http_headers(headers)
layoutlib.print_page_open("PyGallery - Home")
print("<body>")
menu = []
menu.append(("Home", "gallery.cgi"))

user = None
if logged_in:
  user = usersession.get_session_user()

layoutlib.print_page_header(menu, user)

print('<div id="page_body">')
print('<p>Looks like the server broke. Click <a href="/PictureShare/">here</a> '  'to go home</p>')
print('</div>') # end page_body
layoutlib.print_page_close()
